"""
ESP32 specific machine module extensions
"""

from typing import Optional, Tuple
from machine import Pin

class TouchPad:
    """Capacitive touch sensor"""

    def __init__(self, pin: Pin) -> None:
        """Create a TouchPad object"""
        ...

    def read(self) -> int:
        """Read touch value"""
        ...

    def config(self, threshold: int) -> None:
        """Configure touch threshold"""
        ...

class SDCard:
    """SD Card interface"""

    def __init__(self, slot: int = 1, width: int = 1, cd: Optional[Pin] = None, wp: Optional[Pin] = None, sck: Optional[Pin] = None, miso: Optional[Pin] = None, mosi: Optional[Pin] = None, cs: Optional[Pin] = None) -> None:
        """Create an SDCard object"""
        ...

class Hall:
    """Hall sensor"""

    def read(self) -> int:
        """Read hall sensor value"""
        ...

def wake_on_touch(wake: bool) -> None:
    """Enable/disable wake on touch"""
    ...

def wake_on_ext0(pin: Optional[Pin], level: int) -> None:
    """Configure wake on external interrupt 0"""
    ...

def wake_on_ext1(pins: Optional[Tuple[Pin]], level: int) -> None:
    """Configure wake on external interrupt 1"""
    ...
